package com.yxlcommon.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxlcommon.common.vo.OrdersVo;
import com.yxlcommon.common.pojo.Orders;


import java.time.LocalDateTime;
import java.util.List;

public interface OrdersMapper extends BaseMapper<Orders> {

    List<OrdersVo> selectOrdersByUsername(String username);

    OrdersVo selectOrderByOrderNum(String orderNum);

    int updateStatus(Byte status, Long orderId);

    int updateFilename(String filename, String orderNum);

    int updatePayTime(Long orderId);

    Integer selectDemandId(Long orderId);

    OrdersVo selectOrderById(Long orderId);

    IPage<OrdersVo> selectOrdersByPage(Page<OrdersVo> page, String demands);

    List<OrdersVo> selectOrders();

    Integer getOrdersByDay(LocalDateTime startTime, LocalDateTime endTime);
}
